AISC Database API
The AISC Steel package provides access to the AISC steel shapes database, allowing users to easily retrieve and utilize information about various steel shapes. There is one function:
AISCSteel.Database.aisc_database — Methodaisc_database(SteelShape)
aisc_database(filter_function::Function, SteelShape)The aisc_database function provides access to the AISC Steel Shapes database. It can be used to retrieve all shapes or filter them based on a provided function.
Parameters
- SteelShape: A type representing the steel shape, such as- WShape,- CShape,- LShape, etc.
- filter_function: An optional function that takes a collection of shapes and returns a filtered collection based on specific criteria.
Returns
- If SteelShapeis provided, it returns a collection of shapes of that type.
- If filter_functionis provided, it applies the function to the collection of shapes and returns the filtered results.
Example
julia> aisc_database(WShape); # Returns all WShapes from the AISC database.
julia> aisc_database(WShape) do wshapes
            filter!(wshapes) do w
                w.Ix < 100
            end
            sort!(wshapes, :weight)
       end; # Returns WShapes with Ix less than 100 that is sorted by weight.AISC Database Example
Loading the WShape Database
This document serves as an example of how to work with the AISC database within the package.
Lets try to load the aisc database for WShapes.
import AISCSteel.Database: aisc_database
import AISCSteel.Shapes.IShapes.RolledIShapes as ris
df = aisc_database(ris.WShape)
first(df, 5)| Row | shape | weight | area | d | bf | tw | tf | k | k1 | h | Ix | Zx | Sx | rx | Iy | Zy | Sy | ry | J | Cw | Wno | Sw1 | Qf | Qw | rts | ho | PA | PB | PC | PD | T | WGi | WGo | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String7 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Int64? | |
| 1 | W44X408 | 408.0 | 120.0 | 44.8 | 16.1 | 1.22 | 2.17 | 2.96 | 1.8125 | 38.918 | 38700.0 | 2000.0 | 1730.0 | 18.0 | 1520.0 | 297.0 | 189.0 | 3.56 | 134.0 | 691000.0 | 172.0 | 1500.0 | 344.0 | 994.0 | 4.33 | 42.6 | 134.0 | 150.0 | 106.0 | 122.0 | 38.0 | 5.5 | 3 | 
| 2 | W44X368 | 368.0 | 108.0 | 44.4 | 16.0 | 1.1 | 1.97 | 2.76 | 1.75 | 38.94 | 34700.0 | 1800.0 | 1560.0 | 17.9 | 1350.0 | 265.0 | 169.0 | 3.54 | 100.0 | 608000.0 | 170.0 | 1340.0 | 311.0 | 894.0 | 4.28 | 42.4 | 133.0 | 149.0 | 105.0 | 121.0 | 38.0 | 5.5 | 3 | 
| 3 | W44X335 | 335.0 | 98.5 | 44.0 | 15.9 | 1.03 | 1.77 | 2.56 | 1.75 | 39.14 | 31100.0 | 1620.0 | 1410.0 | 17.8 | 1200.0 | 236.0 | 150.0 | 3.49 | 74.7 | 535000.0 | 168.0 | 1180.0 | 278.0 | 805.0 | 4.24 | 42.2 | 132.0 | 148.0 | 104.0 | 120.0 | 38.0 | 5.5 | 3 | 
| 4 | W44X290 | 290.0 | 85.4 | 43.6 | 15.8 | 0.865 | 1.58 | 2.36 | 1.625 | 38.925 | 27000.0 | 1410.0 | 1240.0 | 17.8 | 1040.0 | 205.0 | 132.0 | 3.49 | 50.9 | 461000.0 | 166.0 | 1040.0 | 248.0 | 701.0 | 4.2 | 42.0 | 131.0 | 147.0 | 103.0 | 119.0 | 38.0 | 5.5 | 3 | 
| 5 | W44X262 | 262.0 | 77.2 | 43.3 | 15.8 | 0.785 | 1.42 | 2.2 | 1.625 | 38.936 | 24100.0 | 1270.0 | 1110.0 | 17.7 | 923.0 | 182.0 | 117.0 | 3.47 | 37.3 | 405000.0 | 165.0 | 928.0 | 223.0 | 630.0 | 4.17 | 41.9 | 131.0 | 147.0 | 102.0 | 118.0 | 38.0 | 5.5 | 3 | 
Place the shape of the database you want into the function, and the function will return a DataFrame with all the aisc shapes.
Loading the CShape Database
Here is another example loading the aisc database for CShapes
import AISCSteel.Shapes.CShapes as cs
df = aisc_database(cs.CShape)
first(df, 5)| Row | shape | weight | area | d | bf | tw | tf | k | h | x | eo | xp | Ix | Zx | Sx | rx | Iy | Zy | Sy | ry | J | Cw | Wno | Sw1 | Sw2 | Sw3 | Qf | Qw | ro | H | rts | ho | PA | PB | PC | PD | T | WGi | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String15 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | String7 | |
| 1 | C15X50 | 50.0 | 14.7 | 15.0 | 3.72 | 0.716 | 0.65 | 1.44 | 12.3868 | 0.799 | 0.583 | 0.49 | 404.0 | 68.5 | 53.8 | 5.24 | 11.0 | 8.14 | 3.77 | 0.865 | 2.65 | 492.0 | 17.4 | 13.7 | 11.6 | 5.86 | 14.0 | 34.1 | 5.49 | 0.937 | 1.17 | 14.4 | 39.7 | 43.4 | 33.7 | 37.4 | 12.125 | 2.25 | 
| 2 | C15X40 | 40.0 | 11.8 | 15.0 | 3.52 | 0.52 | 0.65 | 1.44 | 12.376 | 0.778 | 0.767 | 0.392 | 348.0 | 57.5 | 46.5 | 5.43 | 9.17 | 6.84 | 3.34 | 0.883 | 1.45 | 410.0 | 16.0 | 11.7 | 9.2 | 4.64 | 14.0 | 28.6 | 5.71 | 0.927 | 1.15 | 14.4 | 39.2 | 42.7 | 33.5 | 37.0 | 12.125 | 2 | 
| 3 | C15X33.9 | 33.9 | 10.0 | 15.0 | 3.4 | 0.4 | 0.65 | 1.44 | 12.36 | 0.788 | 0.896 | 0.332 | 315.0 | 50.8 | 42.0 | 5.61 | 8.07 | 6.19 | 3.09 | 0.901 | 1.01 | 358.0 | 15.1 | 10.4 | 7.55 | 3.81 | 14.0 | 25.2 | 5.94 | 0.92 | 1.13 | 14.4 | 38.8 | 42.2 | 33.4 | 36.8 | 12.125 | 2 | 
| 4 | C12X30 | 30.0 | 8.81 | 12.0 | 3.17 | 0.51 | 0.501 | 1.13 | 9.894 | 0.674 | 0.618 | 0.367 | 162.0 | 33.8 | 27.0 | 4.29 | 5.12 | 4.32 | 2.05 | 0.762 | 0.861 | 151.0 | 11.7 | 6.01 | 4.91 | 2.45 | 7.66 | 16.8 | 4.54 | 0.919 | 1.01 | 11.5 | 32.3 | 35.5 | 27.2 | 30.3 | 9.75 | 1.75 | 
| 5 | C12X25 | 25.0 | 7.34 | 12.0 | 3.05 | 0.387 | 0.501 | 1.13 | 9.9072 | 0.674 | 0.746 | 0.306 | 144.0 | 29.4 | 24.0 | 4.43 | 4.45 | 3.82 | 1.87 | 0.779 | 0.538 | 130.0 | 11.0 | 5.29 | 4.02 | 1.99 | 7.67 | 14.6 | 4.72 | 0.909 | 1.0 | 11.5 | 32.0 | 35.0 | 27.1 | 30.1 | 9.75 | 1.75 | 
Filtering the data
The aisc_database function can also be used with a filter_function passed as the first argument. A neat way to do this is using the do block syntax.
df = aisc_database(ris.WShape) do wshapes
        filter!(wshapes) do w
            w.Ix < 100
        end
        sort!(wshapes, :weight)
     end
first(df, 5)| Row | shape | weight | area | d | bf | tw | tf | k | k1 | h | Ix | Zx | Sx | rx | Iy | Zy | Sy | ry | J | Cw | Wno | Sw1 | Qf | Qw | rts | ho | PA | PB | PC | PD | T | WGi | WGo | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String7 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Int64? | |
| 1 | W6X8.5 | 8.5 | 2.52 | 5.83 | 3.94 | 0.17 | 0.195 | 0.445 | 0.5 | 4.947 | 14.9 | 5.73 | 5.1 | 2.43 | 1.99 | 1.56 | 1.01 | 0.89 | 0.0333 | 15.8 | 5.55 | 1.06 | 1.03 | 2.78 | 1.05 | 5.64 | 22.8 | 26.7 | 15.6 | 19.5 | 4.5 | 2.25 | missing | 
| 2 | W6X9 | 9.0 | 2.68 | 5.9 | 3.94 | 0.17 | 0.215 | 0.465 | 0.5 | 4.964 | 16.4 | 6.23 | 5.56 | 2.47 | 2.2 | 1.72 | 1.11 | 0.905 | 0.0405 | 17.7 | 5.6 | 1.19 | 1.15 | 3.04 | 1.06 | 5.69 | 22.9 | 26.8 | 15.7 | 19.7 | 4.5 | 2.25 | missing | 
| 3 | W8X10 | 10.0 | 2.96 | 7.89 | 3.94 | 0.17 | 0.205 | 0.505 | 0.5 | 6.885 | 30.8 | 8.87 | 7.81 | 3.22 | 2.09 | 1.66 | 1.06 | 0.841 | 0.0426 | 30.9 | 7.57 | 1.53 | 1.48 | 4.29 | 1.01 | 7.69 | 26.8 | 30.7 | 19.7 | 23.7 | 6.5 | 2.25 | missing | 
| 4 | W10X12 | 12.0 | 3.54 | 9.87 | 3.96 | 0.19 | 0.21 | 0.51 | 0.5625 | 8.854 | 53.8 | 12.6 | 10.9 | 3.9 | 2.18 | 1.74 | 1.1 | 0.785 | 0.0547 | 50.9 | 9.56 | 1.99 | 1.91 | 6.14 | 0.983 | 9.66 | 30.7 | 34.7 | 23.7 | 27.7 | 8.375 | 2.25 | missing | 
| 5 | W6X12 | 12.0 | 3.55 | 6.03 | 4.0 | 0.23 | 0.28 | 0.53 | 0.5625 | 4.968 | 22.1 | 8.3 | 7.31 | 2.49 | 2.99 | 2.32 | 1.5 | 0.918 | 0.0903 | 24.7 | 5.75 | 1.61 | 1.52 | 4.08 | 1.08 | 5.75 | 23.2 | 27.2 | 16.1 | 20.1 | 4.5 | 2.25 | missing | 
Use Database to find optimum shapes
You can use the database to step through and find the optimum shape!
Let's see if we can find the optimum WShape for a member that can resist a moment of 250 kip-ft with an unbraced length of 20 ft.
using StructuralUnits
function optimum_shape(M_u, L_b)
    wshapes = aisc_database(ris.WShape) do wshapes
        sort!(wshapes, :weight)
    end
    for w_data in eachrow(wshapes)
        w = ris.WShape(w_data.shape)
        if ris.Flexure.calc_Mnx(w, L_b) * 0.9 >= M_u
            return w
        end
    end
    error("No shape found!")
end
w = optimum_shape(250kip*ft, 20ft)
w.shape"W12X58"Wow! Now you can quickly find optimum members for your designs!